package hcn.protocol.ods.inpatient;

import hcn.protocol.registration.MsgHeader;
import lombok.ToString;

import javax.xml.bind.annotation.*;
import java.util.List;

@ToString
@XmlRootElement(name = "BSXml")
public class BedInfoHisReq {
    private MsgHeader msgHeader;
    private MsgBody msgBody;

    @XmlElement(name = "MsgHeader")
    public MsgHeader getMsgHeader() {
        return msgHeader;
    }

    public void setMsgHeader(MsgHeader msgHeader) {
        this.msgHeader = msgHeader;
    }

    @XmlElement(name = "MsgBody")
    public MsgBody getMsgBody() {
        return msgBody;
    }

    public void setMsgBody(MsgBody msgBody) {
        this.msgBody = msgBody;
    }

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class MsgBody {
        private String Status;
        private String Code;
        private String Detail;
        private Data Data;

        public String getStatus() {
            return Status;
        }

        public void setStatus(String status) {
            Status = status;
        }

        public String getCode() {
            return Code;
        }

        public void setCode(String code) {
            Code = code;
        }

        public String getDetail() {
            return Detail;
        }

        public void setDetail(String detail) {
            Detail = detail;
        }

        public Data getData() {
            return Data;
        }

        public void setData(Data data) {
            Data = data;
        }

        @ToString
        public static class Data {
            private List<BedInfo> BedInfo;



            @XmlElementWrapper(name = "BedInfos")
            @XmlElement(name = "BedInfo")
            public List<BedInfo> getBedInfo() {
                return BedInfo;
            }

            public void setBedInfo(List<BedInfo> bedInfo) {
                BedInfo = bedInfo;
            }

            @ToString
            public static class BedInfo {
                private String VisitOrganization; //医院ID，医院系统身份标识
                private String VisitOrganizationName;//医院名称
                private String DeptId;//病区代码
                private String DeptName;//病区名称
                private String BedNum;//总床数
                private String EmptyBedNum;//空床床数
                private String SourcePatientId;//患者在医院的唯一识别号
                @XmlElement(name = "VisitOrganization")
                public String getVisitOrganization() {
                    return VisitOrganization;
                }

                public void setVisitOrganization(String visitOrganization) {
                    VisitOrganization = visitOrganization;
                }
                @XmlElement(name = "VisitOrganizationName")
                public String getVisitOrganizationName() {
                    return VisitOrganizationName;
                }

                public void setVisitOrganizationName(String visitOrganizationName) {
                    VisitOrganizationName = visitOrganizationName;
                }

                @XmlElement(name = "DeptId")
                public String getDeptId() {
                    return DeptId;
                }

                public void setDeptId(String deptId) {
                    DeptId = deptId;
                }

                @XmlElement(name = "DeptName")
                public String getDeptName() {
                    return DeptName;
                }

                public void setDeptName(String deptName) {
                    DeptName = deptName;
                }

                @XmlElement(name = "BedNum")
                public String getBedNum() {
                    return BedNum;
                }

                public void setBedNum(String bedNum) {
                    BedNum = bedNum;
                }

                @XmlElement(name = "EmptyBedNum")
                public String getEmptyBedNum() {
                    return EmptyBedNum;
                }

                public void setEmptyBedNum(String emptyBedNum) {
                    EmptyBedNum = emptyBedNum;
                }

                @XmlElement(name = "SourcePatientId")
                public String getSourcePatientId() {
                    return SourcePatientId;
                }

                public void setSourcePatientId(String sourcePatientId) {
                    SourcePatientId = sourcePatientId;
                }
            }
        }
    }

}
